# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=networkmanager-openvpn
_pkgname=NetworkManager-openvpn
pkgver=1.8.12
pkgrel=0
pkgdesc="NetworkManager VPN plugin for OpenVPN"
url="https://wiki.gnome.org/Projects/NetworkManager/VPN"
arch="all !s390x" # Limited by network-manager-applet-dev -> networkmanager-dev
license="GPL-2.0-or-later"
depends="openvpn dbus:org.freedesktop.Secrets"
makedepends="intltool glib-dev gtk+3.0-dev libnma-dev libsecret-dev"
source="https://download.gnome.org/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz"
subpackages="$pkgname-lang"
install="$pkgname.pre-install $pkgname.pre-upgrade"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib \
		--disable-static \
		--without-libnm-glib
}

check() {
	make check
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="1b8adf926426f866f7509a07c24203d6b584627aba4f8e2b1b00fa897bf0d7155009d566c3440565d1ee0e938694dd8d6746f37f62d493864d16eae007590b22  NetworkManager-openvpn-1.8.12.tar.xz"
